﻿using System.Collections.ObjectModel;
using System.Diagnostics;
using Wpf.Ui.Controls;

namespace Luwei.ViewModels.Windows
{
    public partial class MainWindowViewModel : ObservableObject
    {
        [ObservableProperty]
        private string _applicationTitle = ""; // 标题

        [ObservableProperty]
        private ObservableCollection<object> _menuItems = new()
        {
            new NavigationViewItem()
            {
                Content = "首页",
                Tag = "home",
                Icon = new SymbolIcon { Symbol = SymbolRegular.Home24 },
                TargetPageType = typeof(Views.Pages.CardList)
            },
            new NavigationViewItem()
            {
                Content = "通信协议",
                Icon = new SymbolIcon { Symbol = SymbolRegular.Channel24 },
                TargetPageType = typeof(Views.Pages.CardList)},
            new NavigationViewItem()
            {
                Content = "运动控制",
                Icon = new SymbolIcon { Symbol = SymbolRegular.BranchFork24 },
                TargetPageType = typeof(Views.Pages.CardList)},
            new NavigationViewItem()
            {
                Content = "机器视觉",
                Icon = new SymbolIcon { Symbol = SymbolRegular.Camera24 },
                TargetPageType = typeof(Views.Pages.CardList)},
            new NavigationViewItem()
            {
                Content = "日志",
                Icon = new SymbolIcon { Symbol = SymbolRegular.Book24 },
                TargetPageType = typeof(Views.Pages.LogsPage)
            }
        };

        [ObservableProperty]
        private ObservableCollection<object> _footerMenuItems = new()
        {
            new NavigationViewItem()
            {
                Content = "设置",
                Icon = new SymbolIcon { Symbol = SymbolRegular.Settings24 },
                TargetPageType = typeof(Views.Pages.SettingsPage)
            }
        };

        [ObservableProperty]
        private ObservableCollection<MenuItem> _trayMenuItems = new()
        {
            new MenuItem { Header = "Home", Tag = "tray_home" }
        };
    }
}
